package org.gangcai.mac.shop.bean;

import android.text.TextUtils;

import com.blankj.utilcode.util.IntentUtils;

import java.util.List;

/**
 * Created by mac on 2018/4/11.
 */

public class OrderDetailBean extends CommonResonseBean {

    /**
     * goods : {"img":"Public/Uploads/5abc9216607d4.png","goods_name":"Apple iPhone X (A1865) 256GB 深空灰色 移动联通电信4G手机","money":"7788.00"}
     * time : 10
     * money_all : 7943.80
     * type : 1
     * should_pay : 2018-04-12
     * stage_id : 4
     * state : 1
     * repayment : []
     */

    private GoodsBean goods;
    private String time;
    private String money_all;
    private String type;
    private String stage_id;
    private String state;
    private String stage;

    public String getStage() {
        return stage;
    }

    public void setStage(String stage) {
        this.stage = stage;
    }

    public GoodsBean getGoods() {
        return goods;
    }

    public void setGoods(GoodsBean goods) {
        this.goods = goods;
    }

    /**
     *
     * @return
     */
    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getMoney_all() {
        return money_all;
    }

    public void setMoney_all(String money_all) {
        this.money_all = money_all;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }



    public String getStage_id() {
        return stage_id;
    }

    public void setStage_id(String stage_id) {
        this.stage_id = stage_id;
    }

    public String getStateString() {
        if ("1".equals(state)) {
            return "还款中";
        } else if ("2".equals(state)) {
            return "已还清";
        } else {
            return "已逾期";
        }
    }

    public int getState() {
        if (TextUtils.isEmpty(state)) {
            return -1;
        } else {
            return Integer.parseInt(stage_id);
        }
    }



    public static class GoodsBean {
        /**
         * img : Public/Uploads/5abc9216607d4.png
         * goods_name : Apple iPhone X (A1865) 256GB 深空灰色 移动联通电信4G手机
         * money : 7788.00
         */

        private String img;
        private String goods_name;
        private String money;

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }

        public String getGoods_name() {
            return goods_name;
        }

        public void setGoods_name(String goods_name) {
            this.goods_name = goods_name;
        }

        public String getMoney() {
            return money;
        }

        public void setMoney(String money) {
            this.money = money;
        }
    }

}
